unit rcarihar;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Grids, Wwdbigrd, Wwdbgrid, StdCtrls, ppDB, ppBands, ppCache, ppClass,
  ppProd, ppReport, ppComm, ppRelatv, ppDBPipe, ppCtrls, ppVar, ppPrnabl,
  ppModule, daDataModule, TXComp, TXRB;

type
  Trcarihare = class(TForm)
    wwDBGrid1: TwwDBGrid;
    Button1: TButton;
    kapat: TButton;
    Button2: TButton;
    carihardb: TppDBPipeline;
    cariharrapor: TppReport;
    ppHeaderBand1: TppHeaderBand;
    ppDetailBand1: TppDetailBand;
    ppFooterBand1: TppFooterBand;
    ppTitleBand1: TppTitleBand;
    ppLabel1: TppLabel;
    ppSystemVariable1: TppSystemVariable;
    ppSystemVariable2: TppSystemVariable;
    ppDBText1: TppDBText;
    ppLabel2: TppLabel;
    ppDBText2: TppDBText;
    ppLabel3: TppLabel;
    ppDBText3: TppDBText;
    ppLabel4: TppLabel;
    ppDBText4: TppDBText;
    ppLabel5: TppLabel;
    ppDBText5: TppDBText;
    ppLabel6: TppLabel;
    ppDBText6: TppDBText;
    ppLabel7: TppLabel;
    ppDBText7: TppDBText;
    ppLabel8: TppLabel;
    ppLine1: TppLine;
    ppLine2: TppLine;
    ppLabel9: TppLabel;
    ExtraOptions1: TExtraOptions;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure kapatClick(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  rcarihare: Trcarihare;

implementation

uses ucariara2, dmrap, data;

{$R *.DFM}

procedure Trcarihare.Button1Click(Sender: TObject);
begin
  if not assigned(fCariAra2) then
    fCariAra2 := tfCariAra2.create(self);
  if fCariAra2.showmodal = mrok then
  begin
    dmrapor.carihar.Close;
    dmrapor.carihar.Parameters.ParamByName('carikod').value :=
      dm.CariAra.fieldbyname('carikod').value;
    dmrapor.carihar.Open;
  end;
end;

procedure Trcarihare.FormCreate(Sender: TObject);
begin
//  dm.CariTuru.Open;
end;

procedure Trcarihare.FormClose(Sender: TObject; var Action: TCloseAction);
begin
//  dm.CariTuru.close;
  action := cafree;
  rcarihare := nil;
end;

procedure Trcarihare.kapatClick(Sender: TObject);
begin
  close;
end;

procedure Trcarihare.Button2Click(Sender: TObject);
begin
  cariharrapor.print;
end;

end.

